
/* GCSx
** MOUSE.H
**
** Basic mouse display
*/

/*****************************************************************************
** Copyright (C) 2003-2006 Janson
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
*****************************************************************************/

#ifndef __GCSx_MOUSE_H_
#define __GCSx_MOUSE_H_

// Mouse pointers
class MousePointer {
protected:
    SDL_Surface* original;
    SDL_Surface* converted;
    int hotX;
    int hotY;
    
    class TextureMap* tex;
    int texNum;
    
public:
    // (x and y of hot spot)
    MousePointer(const char* filename, int x = 0, int y = 0);
    ~MousePointer();
    
    int tooltipYOffset() const;
    
    // Size for storage
    int xSize() const;
    int ySize() const;
    
    // (also clears any references to previous textures)
    void convertFor(SDL_Surface* screen);
    void displayAt(int x, int y, SDL_Surface* save, SDL_Rect* storeRect);
    void unDisplay(int x, int y, SDL_Surface* saved, SDL_Rect* storeRect) const;

    // (call after convertFor)
    void convertGL(class TextureMap* texmap, int gNum, int xSize, int ySize);
    void textureAt(int x, int y) const;
};

#endif

